FROM 172.16.22.208/library/jdk8:latest
LABEL authors=ash
ENV MEM_MIN="-Xms1024m"
ENV MEM_MAX="-Xmx1024m"
ENV APP_NAME="test-k8s"
RUN mkdir -p /home/project/${APP_NAME}/
WORKDIR /home/project/${APP_NAME}/
COPY target/*.jar .
RUN mv *.jar ${APP_NAME}.jar

EXPOSE 8082

CMD java -Duser.timezone=Asia/Shanghai ${MEM_MIN} ${MEM_MAX} \
-XX:+PrintGCDetails \
-XX:+UseG1GC \
-XX:MaxGCPauseMillis=200 \
-Xloggc:/home/project/${APP_NAME}/log/GC-${APP_NAME}.log \
-jar ${APP_NAME}.jar